#include <myheader.h>

/*Usage:  */
void* son_thread(void *arg){
    while(1);
    return NULL;
}
int main(int argc, char *argv[])
{
    pthread_t tid,tid1;
    pthread_create(&tid,NULL,son_thread,NULL);
    int ret = pthread_cancel(tid);
    THREAD_ERROR_CHECK(ret,"thread_cancel");
    printf("main thread\n");
    ret = pthread_join(tid,NULL);
    THREAD_ERROR_CHECK(ret,"thread_join");
    return 0;
}

